home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7325 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: druid.borland.com!usenet
  2. From: Jeff Jenkins <jjenkins@wpo.borland.com>
  3. Newsgroups: comp.lang.basic.visual.misc,comp.lang.c,comp.lang.c++
  4. Subject: Re: DLL, VB and Borland C/C++
  5. Date: Thu, 22 Feb 1996 11:17:59 -0800
  6. Organization: Borland International
  7. Message-ID: <312CC167.1237@wpo.borland.com>
  8. References: <312A0334.AC5@supaero.fr> <312ABB01.60D@deltanet.com>
  9. NNTP-Posting-Host: beastly.borland.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b5 (Win95; I)
  14.  
  15. Robert Taylor wrote:
  16. > Sylvain Souche wrote:
  17. > >
  18. > > Hi,
  19. > >
  20. > > I am trying desperatly to call a DLL created with Borland C/C++ 4.5 in a
  21. > > VB 3.0 application, but VB always complains about a so called "Bad
  22. > > Calling Convention Error". This Error message is not very documented,
  23. > > and Borland Help files are worth nothing, so...
  24. > >
  25. > > If anyone know about this problem, could you tell me.
  26. > >
  27. > > Thanks for e-mail replies
  28. > >
  29. > > --
  30. > >         Sylvain Souche
  31. > >         Sylvain.Souche@supaero.fr
  32. > You are probably not exporting the function correctly in the Borland C++
  33. > DLL.  I am pretty sure that VB 3.0 requires imported functions to be
  34. > 'FAR PASCAL'.
  35. > If you are not declaring the function as FAR PASCAL, it will default to
  36. > 'CDECL'; which will cause the above mentioned error...
  37. > -- Bob T.
  38.  
  39. Also, make sure you don't have exception handling enabled for the DLL.
  40.  
  41. -- jrj
  42.